package com.cyt.base.exception.base;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @Author: YuShengQiang
 * @Date: 2018-11-21 11:44
 * @Description:基础异常
 */
@Setter
@Getter
@NoArgsConstructor
public class BaseException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    private String module;//模块

    private int code;//错误码

    private Object data;//参数信息

    private String msg;//错误信息

    public BaseException(int code, String msg){
        this.code=code;
        this.msg=msg;
    }
    public BaseException(int code, String msg, Object data){
        this.code=code;
        this.msg=msg;
        this.data=data;
    }
    public BaseException(String module, int code, String msg, Object data){
        this.module=module;
        this.code=code;
        this.msg=msg;
        this.data=data;
    }
}
